<?php

namespace App\Models;


use App\Libs\DataFormat;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;


class UserApply extends Model
{

    use DataFormat;

    protected  $table='reward_time_apply';

    protected $fillable = ['apply_user_id', 'project_id', 'team_id', 'org_id', 'reward_time', 'content', 'attachment', 'attachment', 'verify_status'];

    public static  $formatKey = ['id'=>'int', 'reward_time'=>'string', 'content'=>'string', 'attachment'=>'json_decode', 'verify_status'=>'int', 'verify_msg'=>'string', ];


    protected $casts = [
        'attachment' => 'array',
    ];

    public function project()
    {
        return $this->hasOne('App\Models\Project', 'id', 'project_id');
    }

}
